from math import sqrt
from math import pow


# 加法
def add(x, y):
    return x + y


# 减法
def sub(x, y):
    return x - y


# 乘法
def mul(x, y):
    return x * y


# 除法
def div(x, y):
    if y == 0:
        return False
    else:
        return x / y


# 整除
def div_exact(x, y):
    if y == 0:
        return False
    else:
        return x // y


# 取余
def remainder(x, y):
    if y == 0:
        return False
    else:
        return x % y


# 乘方
def power(x, y):
    return x ** y


# 开方
def extract(x):
    if x == 0:
        return False
    else:
        return sqrt(x)


# 开多次方
def extract_add(x, y):
    if y == 0:
        return False
    else:
        return pow(x, 1/y)


if __name__ == "__main__":
    print(add(1, 2))
    print(sub(1, 2))
    print(mul(1, 2))
    print(div(1, 2))
    print(div_exact(5, 3))
    print(remainder(5, 3))
    print(power(2, 3))
    print(extract(9))
    print(extract_add(8, 0))
